package com.rd.student.dashuju.sunwenzhuo.Test2;

import java.util.LinkedList;

public class Test5 {
    public static void main(String[] args) {
        LinkedList list = new LinkedList();
        String[] strs = {"12345", "67891", "123478099", "9876543", "67891", "12347809933", "12809933", "12347809933111", "9876543", "12809933"};


        for (int i = 0; i < strs.length; i++) {

            if (list.contains(strs[i])) {
                continue;
            } else {
                list.add(strs[i]);
            }

            if (strs[i].length() < 6 || strs[i].length() > 9) {
                list.remove(strs[i]);
            }
        }

        System.out.println(list);
    }
}
